package com.runfig.rocket.controller;

import org.apache.rocketmq.common.message.MessageExt;
import org.apache.rocketmq.spring.annotation.MessageModel;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.annotation.SelectorType;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(
        topic = "3333",
        consumerGroup = "SECKILL_ORDER_GROUP_PRODUCER"


)

public class HelloConsumer implements RocketMQListener<String> {

//    @Override
//    public void onMessage(MessageExt messageExt) {
//        System.out.println("消费消息"+messageExt.getBody());
//    }


    @Override
    public void onMessage(String msg) {
        System.out.println(msg);
    }
}